package cn.teleus.common.util;

import java.util.Date;
import java.util.Random;
import java.util.UUID;

public class CommonTool {
	/**
	 * uuid
	 * @return
	 */
	public static String uuid(){
		return UUID.randomUUID().toString();
	}

	/**
	 * 去掉uuid中的-
	 * @return
	 */
	public static String uuid32(){
		return UUID.randomUUID().toString().replaceAll("-","");
	}

	public static Date now() {
		return new Date();
	}

	public static Date nowSec() {
		return new Date(System.currentTimeMillis() / 1000 * 1000);
	}

	public static String generateSixNum(){
		Random random = new Random();
		int x = random.nextInt(899999);
		x = x+100000;
		return Integer.toString(x);
	}
}